/*
 * @Author: CB
 * @Date: 2023-08-01 10:28:08
 * @Description: 微信系统管理器
 */
import { oops } from "db://oops-framework/core/Oops";
import { PluginSys } from "../PluginSys";


const trace = (...args) => {
    console.log("PluginSysWechat", ...args);
}
const traceError = (...args) => {
    console.error("PluginSysWechat", ...args);
}

export class PluginSysWechat extends PluginSys {
    /** 保存不会变动的数据，减少通讯次数 */
    private tempData = {};

    vibrate(milliseconds: number[], repeat: number = 1) {
        //@ts-ignore
        // heavy、medium、light
        wx.vibrateShort({
            type: 'medium', success: () => {
                oops.log.trace('震动成功');
            }, fail: (error) => {
                oops.log.trace(`震动失败 ${error}`,);
            }
        });
    }

}